package cn.yunyichina.provider.iface.entity.hisiface.examination;

import java.io.Serializable;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.List;

/**
 * 检验报告列表查询出参
 * 
 * @author zhou
 *
 */
public class InspectListVoResponse implements Comparable<Object>,Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -7009509718029059725L;
	
	private String inspectId;
	private String inspectName;
	private String deptName;
	private String doctorName;
	private String doctorCode;
	private String inspectTime;
	private String verifyDoctor;
	private String verifyTime;
	private String inspectDoctor;
	private String provingTime;
	private String reportTime;
	private String fileAddress;

	private String clinicalComment;//临床评语
	private String reportContents;//报告内容
	private String detectionResult;//检出结果

	/*
	 * 检验明细信息
	 */
	private List<InspectDetailVoResponse> InspectDetails;
	
	public String getInspectId() {
		return inspectId;
	}

	public void setInspectId(String inspectId) {
		this.inspectId = inspectId;
	}

	public String getInspectName() {
		return inspectName;
	}

	public void setInspectName(String inspectName) {
		this.inspectName = inspectName;
	}

	public String getDeptName() {
		return deptName;
	}

	public void setDeptName(String deptName) {
		this.deptName = deptName;
	}

	public String getDoctorName() {
		return doctorName;
	}

	public void setDoctorName(String doctorName) {
		this.doctorName = doctorName;
	}

	public String getDoctorCode() {
		return doctorCode;
	}

	public void setDoctorCode(String doctorCode) {
		this.doctorCode = doctorCode;
	}

	public String getInspectTime() {
		return inspectTime;
	}

	public void setInspectTime(String inspectTime) {
		this.inspectTime = inspectTime;
	}

	public String getVerifyDoctor() {
		return verifyDoctor;
	}

	public void setVerifyDoctor(String verifyDoctor) {
		this.verifyDoctor = verifyDoctor;
	}

	public String getVerifyTime() {
		return verifyTime;
	}

	public void setVerifyTime(String verifyTime) {
		this.verifyTime = verifyTime;
	}

	public String getInspectDoctor() {
		return inspectDoctor;
	}

	public void setInspectDoctor(String inspectDoctor) {
		this.inspectDoctor = inspectDoctor;
	}

	public String getProvingTime() {
		return provingTime;
	}

	public void setProvingTime(String provingTime) {
		this.provingTime = provingTime;
	}

	public String getReportTime() {
		return reportTime;
	}

	public void setReportTime(String reportTime) {
		this.reportTime = reportTime;
	}

	public String getFileAddress() {
		return fileAddress;
	}

	public void setFileAddress(String fileAddress) {
		this.fileAddress = fileAddress;
	}

	public List<InspectDetailVoResponse> getInspectDetails() {
		return InspectDetails;
	}

	public void setInspectDetails(List<InspectDetailVoResponse> inspectDetails) {
		InspectDetails = inspectDetails;
	}

	public String getClinicalComment() {
		return clinicalComment;
	}

	public void setClinicalComment(String clinicalComment) {
		this.clinicalComment = clinicalComment;
	}

	public String getReportContents() {
		return reportContents;
	}

	public void setReportContents(String reportContents) {
		this.reportContents = reportContents;
	}

	public String getDetectionResult() {
		return detectionResult;
	}

	public void setDetectionResult(String detectionResult) {
		this.detectionResult = detectionResult;
	}

	@Override
	public int compareTo(Object o) {
		try{
			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
			if (this == o) {
				return 0;
			} else if (o != null && o instanceof InspectListVoResponse) {
				InspectListVoResponse u = (InspectListVoResponse) o;
				if (sdf.parse(u.getReportTime()).getTime() < sdf.parse(this.reportTime).getTime()) //根据date进行排序
					return -1;
				else if (sdf.parse(u.getReportTime()).getTime() == sdf.parse(this.reportTime).getTime())
					return 0;
				else
					return 1;	
			} else {
				return -1;
			}
		
		}catch(ParseException e){
			
		}
		return -1;
	}
	
}
